//导包
import Vue from "vue";
import VueRouter from "vue-router";

//使用路由组件
Vue.use(VueRouter);

// 定义路由表
var routes = [
  {
    //启动之后显示的页面
    name: "index",
    path: "/",
    component: () => import("@/view/MainView"),
  },
  {
    name: "main",
    path: "/main",
    component: () => import("@/view/MainView"),
    children: [],
  },
  {
    name: "ser",
    path: "/ser",
    component: () => import("@/view/SerView"),
    children: [],
  },
  {
    name: "mainok",
    path: "/mainok",
    component: () => import("@/view/MainOk"),
    children: [],
  },
  {
    name: "serok",
    path: "/serok",
    component: () => import("@/view/SerOk"),
    children: [],
  },
  {
    name: "my",
    path: "/my",
    component: () => import("@/view/my/MyWord.vue"),
    children: [],
  },
  {
    name: "manager",
    path: "/manager",
    component: () => import("@/view/my/manager.vue"),
  },
  {
    name: "birthday",
    path: "/birthday",
    component: () => import("@/view/my/birthday.vue"),
  },
  {
    name: "comment",
    path: "/comment",
    component: () => import("@/view/my/comment.vue"),
  },
];

// 创建router实例
var router = new VueRouter({
  routes,
});

// 导出router
export default router;
